import cv2
image=cv2.imread('1.webp')
image1=image.copy()
cv2.imshow('Input',image)
imgGray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
imgCanny=cv2.Canny(imgGray,70,200)
contours,hierarchy=cv2.findContours(imgCanny,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
x,y,w,h=cv2.boundingRect(contours[0])
cv2.rectangle(image,(x,y),(x+w,y+h),(0,0,255),3)
cv2.imshow('BoundingRect',image)
(x,y),radius=cv2.minEnclosingCircle(contours[0])
center=(int(x),int(y))
radius=int(radius)
cv2.circle(image1,center,radius,(0,0,255),3)
cv2.imshow('MinEnclosingCircle',image1)
cv2.waitKey()
cv2.destroyAllWindows()